package com.mtnz.njk.Mapper;

import com.mtnz.njk.entity.PostEntity;
import com.mtnz.njk.model.ActivityPostModel;
import com.mtnz.njk.model.PostAllModel;
import com.mtnz.njk.model.SearchPostModel;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@org.apache.ibatis.annotations.Mapper
public interface PostMapper extends Mapper<PostEntity> {
    //每日一读
    PostEntity findPostDailyStatus(String dailyStatus);

    //混查所有的提问和研究院帖子
   List<PostAllModel>  findPostAll(@Param("tor") String tor,@Param("status") String status);

    //关键字搜索
    List<SearchPostModel> findPostSearch(@Param("keyWord") String keyWord)throws Exception;

    //活动帖子
    List<ActivityPostModel> findActivityPost()throws Exception;

    //查询用户的所有帖子提问
    List<PostAllModel> findPostUserAll(@Param("userId") String userId);
}
